using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Domain.Entidades;


namespace Data.Models.Mapping
{
    public class setor_emailMap : EntityTypeConfiguration<setor_email>
    {
        public setor_emailMap()
        {
            // Primary Key
            this.HasKey(t => t.set_codigo);

            // Properties
            this.Property(t => t.set_desc)
                .IsRequired()
                .HasMaxLength(100);

            this.Property(t => t.set_email)
                .IsRequired()
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("setor_email");
            this.Property(t => t.set_codigo).HasColumnName("set_codigo");
            this.Property(t => t.set_desc).HasColumnName("set_desc");
            this.Property(t => t.set_email).HasColumnName("set_email");
        }
    }
}
